import os

os.chdir(os.path.dirname(__file__))

exe_name = 'change_encoding.exe'
assert os.path.exists(exe_name), f"*** 同级目录下不存在`{exe_name}`?"

files = os.listdir('.')
files = [f'"{path}"' for path in files if path.endswith('.csv')]

path_str = ' '.join(files)
cmd = f'{exe_name} {path_str}'
print(f'cmd --- {cmd}')

os.system(cmd)

